<?php
/**
 * (model) 品类预估（EU国家）
 */
namespace App\Models\SsBasic;

use Illuminate\Database\Eloquent\Model;
class CountryClassifyEstimate extends Model
{
    protected $table = 's_country_classify_estimate';

    protected $guarded = [];

    /**
     * 获取国家预估(汇总)
     * @param $classifyId
     * @param $column
     * @return int|mixed
     */
    public static function getCountryEstimateSum($classifyId, $column){
        $query = self::query();
        if ($classifyId) {
            $query->where('classify_id',$classifyId);
        }
        return $query->sum($column);
    }
}
